<div class="page-content" >
	<div class="panel panel-default">
		<div class="panel-heading">
			<ul class="breadcrumb">
				<li><a href="<{:U('give')}>">配送方式管理</a> </li>
				<li class="active">
					<if condition="$data.id eq ''">添加配送方式
						<else />
						修改配送方式</if>
				</li>
			</ul>
		</div>
		<div class="panel-body">
			<form id="myform" method="post" action="<{:U('giveInsert')}>" class="form-horizontal">
				<input type="hidden" name="id" value="<{$data.id}>">
				<div class="form-group">
					<label for="input-title" class="col-sm-2 control-label">名称</label>
					<div class="col-sm-7">
						<input type="text" class="form-control"  id="payment_code" name="name" value="<{$data.name}>">
					</div>
				</div>
				<div class="form-group">
					<label for="input-title" class="col-sm-2 control-label">运费</label>
					<div class="col-sm-7">
						<input type="text" class="form-control"  id="payment_code" name="fee" value="<{$data.fee}>">
					</div>
				</div>
				<div class="form-group">
					<label for="input-title" class="col-sm-2 control-label">联系方式</label>
					<div class="col-sm-7">
						<input type="text" class="form-control"  id="tel" name="tel" value="<{$data.tel}>">
					</div>
				</div>
				<div class="form-group">
					<label for="input-title" class="col-sm-2 control-label">代码</label>
					<div class="col-sm-7">
						<input type="text" class="form-control"  name="code" value="<{$data.code}>">
					</div>
				</div>
				<if condition="$data['id']">
					<div class="form-group">
						<label for="input-title" class="col-sm-2 control-label">状态</label>
						<div class="col-sm-7"> <input type="radio" name="status" value="1"  
							<if condition="$data['status'] eq 1">checked="checked"</if>
							/>有效 <input type="radio" name="status" value="0" 
							<if condition="$data['status'] eq 0">checked="checked"</if>
							/>无效 </div>
					</div>
				</if>
				<div class="form-group">
					<div class="col-sm-offset-2 col-sm-7">
						<button type="submit" class="btn btn-primary">保存</button>
					</div>
				</div>
			</form>
		</div>
	</div>
</div>
<script>
 
$(function(){
    $(".form-horizontal").bootstrapValidator({
        message: '您填入的值不合法',
        fields:{
            name: {
                message: '名称',
                validators: {
                    notEmpty: {
                        message: '请输入名称'
                    }, 
                }
            },
			 code: {
                message: '代码',
                validators: {
                    notEmpty: {
                        message: '请输入物流公司代码'
                    }, 
                }
            },
			
			 

        }
    });
	
 
});
 </script> 